import request from "@/utils/request";

// 条件分页查询老人档案
export function elderlyfilePage(params) {
	return request({
		url: "/sinohis/pension/profession/elderlyfile/condition/page",
		method: 'get',
		params
	});
}


// 添加老人自理能力评估记录
export function addSelfCareEvaluationRecord(elderlyCode, data) {
	return request({
		url: "/sinohis/pension/profession/evaluationrecord/addSelfCareEvaluationRecord/" + elderlyCode,
		method: 'POST',
		data
	});
}

// 修改未提交的评估记录
export function modifySelfCareEvaluationRecord(number, data) {
	return request({
		url: "/sinohis/pension/profession/evaluationrecord/modifySelfCareEvaluationRecord/" + number,
		method: 'PUT',
		data
	});
}

// 删除评估记录(管理员账户)
export function removeEvaluationRecord(params) {
	return request({
		url: "/sinohis/pension/profession/evaluationrecord/removeEvaluationRecord/" + params.number,
		method: 'DELETE',
		params
	});
}

// 查询老人最近一次的评估记录信息
export function searchRecentSelfCareEvaluationRecord(params) {
	return request({
		url: "/sinohis/pension/profession/evaluationrecord/searchRecentSelfCareEvaluationRecord/" + params.elderlyCode,
		method: 'get',
		params
	});
}

// 提交评估记录
export function submitEvaluationRecord(data) {
	return request({
		url: "/sinohis/pension/profession/evaluationrecord/submitEvaluationRecord/" + data.number,
		method: 'PUT',
		data
	});
}

// 条件分页查询老人评估记录
export function searchSelfCareEvaluationRecordOfCondition(params) {
	return request({
		url: "/sinohis/pension/profession/evaluationrecord/searchSelfCareEvaluationRecordOfCondition",
		method: 'get',
		params
	});
}

//分页查询人员
export function searchrole(params) {
  return request({
    url: "/sinohis/pension/sys/user/all/organ",
    method: 'get',
    params
  });
}

//开启老人自理能力评估记录
export function startSelfCareEvaluationRecord(data) {
  return request({
    url: "sinohis/pension/profession/evaluationrecord/startSelfCareEvaluationRecord/"+ data.elderlyCode,
    method: 'POST',
    data
  });
}
//添加或修改日常生活活动评估内容


export function addAssessmentOfActivitiesOfDailyLiving(data) {
  return request({
    url: "sinohis/pension/profession/evaluationrecord/addAssessmentOfActivitiesOfDailyLiving/"+ data.number,
    method: 'POST',
    data
  });
}
//添加或修改精神状态评估内容
export function addMentalStateAssessment(data) {
  return request({
    url: "sinohis/pension/profession/evaluationrecord/addMentalStateAssessment/"+ data.number,
    method: 'POST',
    data
  });
}
//添加或修改感知觉与沟通评估内容

export function addPerceptionAndCommunicationAssessment(data) {
  return request({
    url: "sinohis/pension/profession/evaluationrecord/addPerceptionAndCommunicationAssessment/"+ data.number,
    method: 'POST',
    data
  });
}
//添加或修改社会参与评估内容
export function addSocialParticipationAssessment(data) {
      return request({
        url: "sinohis/pension/profession/evaluationrecord/addSocialParticipationAssessment/"+ data.number,
        method: 'POST',
        data
  });
}
//查询老年人评估报告初始生成


export function searchinitAssessmentReport(params) {
  return request({
    url: "sinohis/pension/profession/evaluationrecord/initAssessmentReport/"+ params.number,
    method: 'get',
    params
  });
}
//添加评估报告 完成评估
export function addAssessmentReport(data) {
  return request({
    url: "sinohis/pension/profession/evaluationrecord/addAssessmentReport/"+ data.number,
    method: 'POST',
    data
  });
}

//分页查询老人评估记录

export function searchSelfCareEvaluationRecordsOfPage(params) {
  return request({
    url: "/sinohis/pension/profession/evaluationrecord/searchSelfCareEvaluationRecordsOfPage",
    method: 'get',
    params
  });
}
//查询某评估记录详细情况（包含评估内容以及评估报告）

export function searchSelfCareEvaluationRecordVO(params) {
  return request({
    url: "/sinohis/pension/profession/evaluationrecord/searchSelfCareEvaluationRecordVO/"+params.number,
    method: 'get',
    params
  });
}

